package o;

import com.huawei.hmf.orb.exception.ConnectRemoteException;
import com.huawei.hmf.orb.exception.ConnectRemoteException.e;

public class fho {
    private static final fhr ˊ = new fhr();

    public interface b {
        void ˏ(ffd o_ffd, ConnectRemoteException connectRemoteException);
    }

    public static fhq ˏ() {
        return ˊ.ॱ();
    }

    public static synchronized void ˋ(ffa o_ffa, final b bVar) {
        synchronized (fho.class) {
            ˊ.ॱ(o_ffa).ˏ(new fjq<ffd>() {
                public void onComplete(fjo<ffd> o_fjo_o_ffd) {
                    if (o_fjo_o_ffd.ˊ()) {
                        bVar.ˏ((ffd) o_fjo_o_ffd.ॱ(), null);
                        return;
                    }
                    ConnectRemoteException connectRemoteException;
                    if (o_fjo_o_ffd.ˋ() instanceof ConnectRemoteException) {
                        connectRemoteException = (ConnectRemoteException) o_fjo_o_ffd.ˋ();
                    } else {
                        connectRemoteException = new ConnectRemoteException(e.UnableBindService, "Unknown error");
                    }
                    bVar.ˏ(null, connectRemoteException);
                }
            });
        }
    }
}
